import { createApp } from 'vue'
import App from './App.vue'

import router from './router'
import pinia from './store'
import './permission'

import elementIcon from './plugins/elementIcon'
import svgIcon from './plugins/svgIcon'
import plugins from './plugins' // plugins
import '@/assets/styles/index.scss' // global css

import directive from './directive' //权限指令

const app = createApp(App)
app.use(pinia)
app.use(router)
// 注册组件
app.use(elementIcon)
app.use(svgIcon)
app.use(plugins)

directive(app)

router.isReady().then(() => {
  app.mount('#app')
})
